CuDoubleSidedScannerC  1.22
dss_types.h File Reference

Data and parameters definition. More...

Go to the source code of this file.

Data Structures

struct  ScannerDevice
 
struct  LedBarSetting
 
struct  ScanParametersStruct
 
struct  ImageFromScannerStruct
 
struct  UltrasonicParametersStruct
 
struct  CropParametersStruct
 
struct  ScannerCapabilities
 

Macros

#define MAXCHARBUFFER   256
 Lenght, in characters, of a standard string.
 
#define DW_MAX_DEVICE_CONNECTED   6
 Max number of scanner connected at the same time.
 
#define MAX_PARAM_LOG_STRING   1500
 Max lenght of a parameter log string.
 

Typedefs

typedef char int8
 Service type definition.
 
typedef short int16
 Service type definition.
 
typedef int int32
 Service type definition.
 
typedef unsigned char uint8
 Service type definition.
 
typedef unsigned short uint16
 Service type definition.
 
typedef unsigned int uint32
 Service type definition.
 
typedef uint32 DeviceID
 Device ID used to select the device to connect to.
 

Enumerations

enum  LogVerbosity : uint8 {
  DSS_LOG_DISABLED = 0,
  DSS_LOG_FATAL = 1,
  DSS_LOG_ERROR = 2,
  DSS_LOG_WARNING = 3,
  DSS_LOG_INFO = 4,
  DSS_LOG_DEBUG = 6,
  DSS_LOG_DEEP_DEBUG = 7
}
 Log verbosity. Set library log verbosity using InitLibrary More...
 
enum  CropPrecision : BYTE {
  NORMAL = 0,
  LOW = 1,
  HIGHT = 2,
  VERYHIGHT = 3
}
 Indicates the Crop / Deskew precision. More...
 
enum  FormStanding : BYTE {
  HOLD_TICKET = 0,
  DRIVE_FORWARD = 1,
  DRIVE_BACKWARD = 2
}
 Indicates where the paper form will be driven after the scan job. More...
 
enum  FormMovement : BYTE {
  LOAD_PAPER = 1,
  EJECT_PAPER_FORWARD = 2,
  RETRACT_PAPER_BACKWARD = 3
}
 Indicates the paper form movement More...
 
enum  ImageColorDepthType : WORD {
  RedChannel8bpp = 0x0108,
  GreenChannel8bpp = 0x0208,
  BlueChannel8bpp = 0x0308,
  UltravioletChannel8bpp = 0x0408,
  Grey8bpp = 0x0608,
  RedChannel1bpp = 0x0101,
  GreenChannel1bpp = 0x0201,
  BlueChannel1bpp = 0x0301,
  BlackAndWhite = 0x0601,
  UltravioletChannel1bpp = 0x0401,
  Color24bpp = 0x0618,
  ColorAndUltraviolet24bpp = 0x0718,
  Grey16bpp = 0x0610,
  Color48bpp = 0x0630
}
 
enum  ScanSide : BYTE {
  SIDE_A = 1,
  SIDE_B = 2,
  SIDE_A_AND_B = 3
}
 
enum  GammaChannel : BYTE {
  CHANNEL_RED = 1,
  CHANNEL_GREEN = 2,
  CHANNEL_BLUE = 3
}
 
enum  ImageFileFormat : BYTE {
  Tiff = 0,
  Bmp = 1,
  Jpeg = 2,
  Raw = 3,
  Tiff_Comp_Rle = 4,
  Tiff_Comp_Lzw = 5,
  Tiff_Comp_CCITT4 = 6,
  Tiff_Comp_CCITT3 = 7,
  Png = 8,
  Jpeg_Native = 9
}
 
enum  SensorStatus : BYTE {
  NoPaper = 0,
  PaperPresent = 1,
  NotAvailable = 0xFF
}
 
enum  ScannerType : BYTE {
  A4 = 4,
  A6 = 6,
  MM80 = 80
}
 
enum  DeviceModel : BYTE {
  A4_Scanner = 1,
  A6_Scanner = 2,
  A6_PRO_Scanner = 3,
  A4_216_Void_Scanner = 4,
  A4_SM_PaperHandler = 5,
  A4_Scan_A4SE = 6,
  SCAN105 = 7,
  KUBEIII_SCANNER = 8
}
 
enum  ImageResolution : DWORD {
  RESOLUTION_100_DPI = 100,
  RESOLUTION_150_DPI = 150,
  RESOLUTION_200_DPI = 200,
  RESOLUTION_250_DPI = 250,
  RESOLUTION_300_DPI = 300,
  RESOLUTION_600_DPI = 600
}
 
enum  LedBarChannel : DWORD {
  Channel_1 = 1,
  Channel_2 = 2,
  Channel_3 = 4,
  Channel_4 = 8
}
 
enum  LedBarLight : DWORD {
  Off = 0,
  On = 1,
  SlowBlinking = 2,
  FastBlinking = 4
}
 
enum  DoubleSheetDetectOpt : DWORD {
  DetectOff = 0,
  Level1 = 1,
  Level2 = 2,
  Level3 = 3,
  Level4 = 4
}
 
enum  PaperHeldBackDetectionOpt : DWORD {
  HBDetect_Off = 0,
  HBDetect_On = 1
}
 
enum  WorkingParameter : DWORD {
  None = 0,
  LogImage = 0x00000001,
  BackupLogFiles = 0x00000004,
  KeepAllLogImages = 0x00000008
}
 
enum  ScannerPrintDensity : DWORD {
  DENSITY_M50 = 0x30,
  DENSITY_M37 = 0x31,
  DENSITY_M25 = 0x32,
  DENSITY_M12 = 0x33,
  DENSITY_NORMAL = 0x34,
  DENSITY_P12 = 0x35,
  DENSITY_P25 = 0x36,
  DENSITY_P37 = 0x37,
  DENSITY_P50 = 0x38,
  DENSITY_NOT_SET = 0xFF
}
 Scanner print density. Only for scanners that support print option More...
 

Functions

static BYTE ConvertImageColorDepthToBpp (ImageColorDepthType depthType)
 
static void ScanParametersToStringA (ScanParametersStruct *pParameters, char *szBufferOut, DWORD dwBuffCharSize)
 
static void LedBarParametersToStringA (LedBarSetting *pParameters, char *szBufferOut, DWORD dwBuffCharSize)
 
static void DeviceModelToStringA (DeviceModel deviceModel, char *szBufferOut, DWORD dwBuffCharSize)
 
static void CropParametersToStringA (CropParametersStruct *pParameters, char *szBufferOut, DWORD dwBuffCharSize)
 

Detailed Description

Data and parameters definition.

Enumeration Type Documentation

◆ CropPrecision

enum CropPrecision : BYTE

Indicates the Crop / Deskew precision.

Enumerator
NORMAL 

The crop / deskew 'll search the edges into the images every 5mm

LOW 

The crop / deskew 'll search the edges into the images every 10mm

HIGHT 

The crop / deskew 'll search the edges into the images every 1mm

VERYHIGHT 

The crop / deskew 'll search the edges into the images every pixel

◆ DeviceModel

enum DeviceModel : BYTE

Scanner model: scan width and scanner board.

Enumerator
A4_Scanner 

A4 scanner.

A6_Scanner 

A6 scanner.

A6_PRO_Scanner 

A6 scanner PRO.

A4_216_Void_Scanner 

Scan 216 void.

A4_SM_PaperHandler 

Paper Handler.

A4_Scan_A4SE 

Scan A4-SE.

SCAN105 

SCAN105 scanner.

KUBEIII_SCANNER 

KUBEIII SCANNER.

◆ DoubleSheetDetectOpt

enum DoubleSheetDetectOpt : DWORD

Ultrasonic sensor settings for double/multiple sheet loaded detection.

Enumerator
DetectOff 

Turn OFF the double/multiple sheet detection.

Level1 

Turn ON the double/multiple sheet detection, using VERY HIGH sensor sensitivity.

Level2 

Turn ON the double/multiple sheet detection, using HIGH sensor sensitivity (Only supported by DeviceModel::A4_Scanner and DeviceModel::A6_PRO_Scanner)

Level3 

Turn ON the double/multiple sheet detection, using LOW sensor sensitivity (Only supported by DeviceModel::A4_Scanner and DeviceModel::A6_PRO_Scanner)

Level4 

Turn ON the double/multiple sheet detection, using VERY LOW sensor sensitivity (Only supported by DeviceModel::A4_Scanner and DeviceModel::A6_PRO_Scanner)

◆ FormMovement

enum FormMovement : BYTE

Indicates the paper form movement

Enumerator
LOAD_PAPER 

Load paper

EJECT_PAPER_FORWARD 

Eject/move forward the paper form

RETRACT_PAPER_BACKWARD 

Retract/move back the paper form

◆ FormStanding

enum FormStanding : BYTE

Indicates where the paper form will be driven after the scan job.

Enumerator
HOLD_TICKET 

The scanned form will be hold by the scanner

DRIVE_FORWARD 

The scanned form will be moved over the scanner (eject)

DRIVE_BACKWARD 

The scanned form will return back to the user (retract)

◆ GammaChannel

enum GammaChannel : BYTE

Gamma Channel.

Enumerator
CHANNEL_RED 

Red.

CHANNEL_GREEN 

Green.

CHANNEL_BLUE 

Blue.

◆ ImageColorDepthType

enum ImageColorDepthType : WORD

Image color depth type, and color channels

Enumerator
RedChannel8bpp 

RED channel - 8 bit per pixel grey scale image.

GreenChannel8bpp 

GREEN channel - 8 bit per pixel grey scale image.

BlueChannel8bpp 

BLUE channel - 8 bit per pixel grey scale image.

UltravioletChannel8bpp 

ULTRAVIOLET channel - 8 bit per pixel grey scale image.

Grey8bpp 

8 bit per pixel grey scale image

RedChannel1bpp 

RED channel - 1 bit per pixel black and white.

GreenChannel1bpp 

GREEN channel - 1 bit per pixel black and white.

BlueChannel1bpp 

BLUE channel - 1 bit per pixel black and white.

BlackAndWhite 

1 bit per pixel black and white image

UltravioletChannel1bpp 

ULTRAVIOLET channel - 1 bit per pixel black and white.

Color24bpp 

24 bit per pixel color image

ColorAndUltraviolet24bpp 

24 bit per pixel color image + ULTRAVIOLET channel.

Grey16bpp 

16 bit per pixel grey scale image. Not supported. Do not use

Color48bpp 

48 bit per pixel color image. Not supported. Do not use

◆ ImageFileFormat

enum ImageFileFormat : BYTE

Ouput image format.

Enumerator
Tiff 

Tiff image without compression.

Bmp 

Bmp image.

Jpeg 

Jpeg image.

Raw 

Raw image. The image will be saved from up-left to down-right. For 1 bpp, value 0 means black, value 1 means white; for 8 bpp data is a grey scale starting from 0 (black) to 255 (white); for 24 bpp data is saved in RGB.

Tiff_Comp_Rle 

Tiff image with RLE compression.

Tiff_Comp_Lzw 

Tiff image with LZW compression.

Tiff_Comp_CCITT4 

Tiff image with CCITT4 compression.

Warning
This compression only creates black and white (1 bpp) images. Scan will be forced to be 1 bpp.
Tiff_Comp_CCITT3 

Tiff image with CCITT3 compression.

Warning
This compression only creates black and white (1 bpp) images. Scan will be forced to be 1 bpp.
Png 

Png image.

Jpeg_Native 

Native Jpeg image. Only supported by DeviceModel::A4_Scanner and DeviceModel::A6_PRO_Scanner.

◆ ImageResolution

enum ImageResolution : DWORD

Output image resolution

Enumerator
RESOLUTION_100_DPI 

100 dpi resolution

RESOLUTION_150_DPI 

150 dpi resolution

RESOLUTION_200_DPI 

200 dpi resolution

RESOLUTION_250_DPI 

250 dpi resolution

RESOLUTION_300_DPI 

300 dpi resolution

RESOLUTION_600_DPI 

600 dpi resolution

◆ LedBarChannel

enum LedBarChannel : DWORD

Led bar channels. The values are bit-masks: it is possible to select more than one value at time, putting in OR their values. The meaning of each channel may be different depending on the type of installed led bar.

Enumerator
Channel_1 

Channel 1. Central red leds.

Channel_2 

Channel 2. Central green leds.

Channel_3 

Channel 3. Red leds on edge.

Channel_4 

Channel 4. Green leds on edge.

◆ LedBarLight

enum LedBarLight : DWORD

Led bar on/off or blinking mode.

Enumerator
Off 

Turn OFF the led bar.

On 

Turn ON the led bar.

SlowBlinking 

Led bar slow blinking.

FastBlinking 

Led bar fast blinking.

◆ LogVerbosity

Log verbosity. Set library log verbosity using InitLibrary

Enumerator
DSS_LOG_DISABLED 

Log completely disabled

DSS_LOG_FATAL 

Only log fatal errors

DSS_LOG_ERROR 

(normal) Log errors. Program will continue

DSS_LOG_WARNING 

Also log warning - something suspicious occured

DSS_LOG_INFO 

Also log hints and informational messages

DSS_LOG_DEBUG 

Log all messages, also debug messages. Use only if required

DSS_LOG_DEEP_DEBUG 

Log all messages, also deep debug messages. Use only if required. Could slow down the communication

◆ PaperHeldBackDetectionOpt

Settings for paper held back detection.

Enumerator
HBDetect_Off 

Turn OFF the paper held back detection (not advised)

HBDetect_On 

Turn ON the paper held back detection (advised)

◆ ScannerPrintDensity

enum ScannerPrintDensity : DWORD

Scanner print density. Only for scanners that support print option

Enumerator
DENSITY_M50 

Print Density -50%

DENSITY_M37 

Print Density -37%

DENSITY_M25 

Print Density -25%

DENSITY_M12 

Print Density -12%

DENSITY_NORMAL 

Print Density 0%

DENSITY_P12 

Print Density +12%

DENSITY_P25 

Print Density +25%

DENSITY_P37 

Print Density +37%

DENSITY_P50 

Print Density +50%

DENSITY_NOT_SET 

Not set by the library

◆ ScannerType

enum ScannerType : BYTE

Scanner type.

Enumerator
A4 

A4 scanner.

A6 

A6 scanner.

MM80 

80mm scanner

◆ ScanSide

enum ScanSide : BYTE

Scan side.

Warning
Allowed choices : SIDE_A and SIDE_A_AND_B. Only SIDE_B is not allowed
Enumerator
SIDE_A 

Front/Up side.

SIDE_B 

Back/Down side. Not allowed as a single choice.

SIDE_A_AND_B 

Scan on Front/Up and Back/Down side.

◆ SensorStatus

enum SensorStatus : BYTE

Paper sensor status

Enumerator
NoPaper 

No paper upon the sensor.

PaperPresent 

The paper is upon the sensor.

NotAvailable 

Sensor not available on this device.

◆ WorkingParameter

enum WorkingParameter : DWORD

Library working parameter. Values are bit masks.

Enumerator
None 

No working parameter enabled.

LogImage 

Enable log image. The library logs the images got from the scanner.

Warning
The images will be deleted at every InitLibrary() or ConnectScanner(), if their number exceeds the number of 20 files. To keep all images, also select KeepAllLogImages option. If InitLibrary() or ConnectScanner() are called after a big number of scan jobs, the saved images files could use big amount of disk space.
BackupLogFiles 

Backup the log file when the log file exceeds the maximum size. The backupped file is the log file renamed with date and time.

Warning
The log files are never deleted, and could use big amount of disk space.
KeepAllLogImages 

Don't delete the log images, also if their number exceeds the maximum number of allowed files.

Warning
The image log files are never deleted, and they could use big amount of disk space.

Function Documentation

◆ ConvertImageColorDepthToBpp()

static BYTE ConvertImageColorDepthToBpp ( ImageColorDepthType  depthType)
static

Converts ImageColorDepthType to a "bit per pixel" format.

Parameters
[in]depthTypeColor depth type
Returns
the number of bit per pixel

◆ CropParametersToStringA()

static void CropParametersToStringA ( CropParametersStruct *  pParameters,
char *  szBufferOut,
DWORD  dwBuffCharSize 
)
static

Convert crop parameters indicated by *pParameters to an ANSI string.

Parameters
[in]pParametersPointer to a CropParametersStruct which contains the crop / Deskew parameters
[out]szBufferOutPointer to a null-terminated char buffer containing a text description for the crop / Deskew parameters. The buffer must be allocated by the calling process
[in]dwBuffCharSizeSize of szBufferOut, in chars

Referenced by GetCropParameters(), and SetCropParameters().

◆ DeviceModelToStringA()

static void DeviceModelToStringA ( DeviceModel  deviceModel,
char *  szBufferOut,
DWORD  dwBuffCharSize 
)
static

Convert device model indicated by deviceModel to an ANSI string.

Parameters
[in]deviceModelA DeviceModel value to be translated to a string
[out]szBufferOutPointer to a null-terminated char buffer The buffer must be allocated by the calling process
[in]dwBuffCharSizeSize of szBufferOut, in chars

◆ LedBarParametersToStringA()

static void LedBarParametersToStringA ( LedBarSetting *  pParameters,
char *  szBufferOut,
DWORD  dwBuffCharSize 
)
static

Convert led bar parameters indicated by *pParameters to an ANSI string.

Parameters
[in]pParametersPointer to a LedBarSetting which contains the led bar parameters
[out]szBufferOutPointer to a null-terminated char buffer containing a text description for the led bar parameters. The buffer must be allocated by the calling process
[in]dwBuffCharSizeSize of szBufferOut, in chars

◆ ScanParametersToStringA()

static void ScanParametersToStringA ( ScanParametersStruct *  pParameters,
char *  szBufferOut,
DWORD  dwBuffCharSize 
)
static

Convert scan parameters indicated by *pParameters to an ANSI string.

Parameters
[in]pParametersPointer to a ScanParametersStruct which contains the scan parameters
[out]szBufferOutPointer to a null-terminated char buffer containing a text description for the scan parameters. The buffer must be allocated by the calling process
[in]dwBuffCharSizeSize of szBufferOut, in chars